package routines;

import javax.persistence.*;

import java.sql.Timestamp;
import java.util.Date;
import java.math.BigDecimal;

import static javax.persistence.AccessType.PROPERTY;


/**
 * The persistent class for the legalentity_bank database table.
 * 
 */
@Entity
@Table(name = "bankinfo")
@Access(PROPERTY)
public class  BankInfo extends Print {

	private Long id;

	private String bic;

	private Date datekgrregistration;

	private Date inserted = new Date();

	private Date maindatereg;

	private String mainregnumber;

	private Integer regcode;

	private String regnumber;

	private String orgstatus;

	private LegalEntity legalentity;

	
	@Id
	@Column(name = "bankinfo_id")
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_bankinfo_gen")
	@SequenceGenerator(name = "seq_bankinfo_gen", sequenceName = "seq_bankinfo")
	public Long getId() {
		return id;
	}



	public void setId(Long id) {
		this.id = id;
	}



	@Column(columnDefinition = "TEXT")
	public String getOrgstatus() {
		return orgstatus;
	}



	public void setOrgstatus(String orgstatus) {
		this.orgstatus = orgstatus;
	}

	

	@OneToOne
	@JoinColumn(name = "legalentity_id")
	public LegalEntity getLegalentity() {
		return legalentity;
	}



	public void setLegalentity(LegalEntity legalentity) {
		this.legalentity = legalentity;
	}

	private Date ssvDate;

	private BigDecimal ustmoney;

	public BankInfo() {
	}



	@Column(columnDefinition = "TEXT")
	public String getBic() {
		return this.bic;
	}

	public void setBic(String bic) {
		this.bic = bic;
	}

	public Date getDatekgrregistration() {
		return this.datekgrregistration;
	}

	public void setDatekgrregistration(Date datekgrregistration) {
		this.datekgrregistration = datekgrregistration;
	}



	public Date getInserted() {
		return this.inserted;
	}

	public void setInserted(Date inserted) {
		this.inserted = inserted;
	}

	public Date getMaindatereg() {
		return this.maindatereg;
	}

	public void setMaindatereg(Date maindatereg) {
		this.maindatereg = maindatereg;
	}

	@Column(columnDefinition = "TEXT")
	public String getMainregnumber() {
		return this.mainregnumber;
	}

	public void setMainregnumber(String mainregnumber) {
		this.mainregnumber = mainregnumber;
	}



	public Integer getRegcode() {
		return this.regcode;
	}

	public void setRegcode(Integer regcode) {
		this.regcode = regcode;
	}

	@Column(columnDefinition = "TEXT")
	public String getRegnumber() {
		return this.regnumber;
	}

	public void setRegnumber(String regnumber) {
		this.regnumber = regnumber;
	}


	@Column(name="ssv_date")
	public Date getSsvDate() {
		return this.ssvDate;
	}

	public void setSsvDate(Date ssvDate) {
		this.ssvDate = ssvDate;
	}

	public BigDecimal getUstmoney() {
		return this.ustmoney;
	}

	public void setUstmoney(BigDecimal ustmoney) {
		this.ustmoney = ustmoney;
	}

	public void setUstmoney(Double ustmoney) {
		setUstmoney(new BigDecimal(ustmoney));
	}

}